package com.kk.fatory;

public class test {
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        Person person2 =(Person) PersonFactory.getBean("person2");
        person2.say();
        System.out.println("person2.toString() = " + person2.toString());
        Person person6 =(Person) PersonFactory.getBean("person2");
        Person person4 =(Person) PersonFactory.getBean("person2");
        System.out.println("person6.toString() = " + person6.toString());

        System.out.println("person4.toString() = " + person4.toString());
    }
}
